<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>道具预约 - 游乐园信息管理系统</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/components.css">
    <link rel="stylesheet" href="css/equipment-book.css">
</head>

<body>
    <header class="header">
        <div class="header-container">
            <button class="mobile-menu-btn" onclick="toggleMobileMenu()">☰</button>
            <div class="location">
                <span class="location-icon">📍</span>
                <span class="location-text">Beijing, China</span>
            </div>
            <nav class="main-nav">
                <a href="index.html" class="nav-item">首页</a>
                <a href="restarea/rest-area.html" class="nav-item">休息区预约</a>
                <a href="transport/shuttle-call.html" class="nav-item">摆渡车呼叫</a>
                <a href="recommend/project-recommend.html" class="nav-item">项目实时推荐</a>
                <a href="equipment-book.html" class="nav-item active">道具预约</a>
                <a href="order.html" class="nav-item">订餐服务</a>
                <a href="help/help.html" class="nav-item">帮助</a>
            </nav>
            <div class="user-actions">
                <button class="back-btn" onclick="goBack()">返回</button>
            </div>
        </div>
    </header>

    <aside class="sidebar">
        <div class="sidebar-header">
            <h3>道具租赁</h3>
            <button class="collapse-btn" onclick="toggleSidebar()">◀</button>
        </div>
        <ul class="project-list">
            <li><a href="equipment-book.html" class="active">
                    <span class="project-icon">🎯</span>
                    <span class="project-text">道具预约</span>
                </a></li>
            <li><a href="projects/roller-coaster.html">
                    <span class="project-icon">💦</span>
                    <span class="project-text">激流勇进</span>
                </a></li>
            <li><a href="projects/vr-cinema.html">
                    <span class="project-icon">🥽</span>
                    <span class="project-text">VR影院</span>
                </a></li>
            <li><a href="personal/personal-center.html">
                    <span class="project-icon">👤</span>
                    <span class="project-text">个人中心</span>
                </a></li>
        </ul>
    </aside>

    <main class="main-content">
        <div class="page-content">
            <!-- 高优先级游客标识 -->
            <div class="priority-indicator" id="priorityIndicator" style="display: none;">
                <div class="priority-badge urgent">
                    <span class="priority-icon">⭐</span>
                    <span>高优先级游客 - 可优先预约道具</span>
                </div>
            </div>

            <div class="page-header">
                <h3>🎯 道具预约</h3>
                <p class="update-time">库存实时更新: <span id="updateTime">刚刚</span></p>
            </div>

            <!-- 道具分类 -->
            <div class="equipment-categories">
                <button class="category-btn active" data-category="all"
                    onclick="equipmentManager.filterByCategory('all')">全部道具</button>
                <!-- 分类按钮将通过JS动态加载 -->
            </div>

            <!-- 道具网格 -->
            <div class="equipment-grid" id="equipmentGrid">
                <!-- 道具卡片将通过JS动态加载 -->
            </div>

            <!-- 预约表单 -->
            <div class="booking-form">
                <h4>📅 道具预约</h4>
                <form id="equipmentBookingForm">
                    <input type="hidden" id="selectedEquipmentId">
                    <div class="form-row">
                        <div class="form-group">
                            <label for="equipmentName">选择道具</label>
                            <select id="equipmentName" class="form-control" required>
                                <option value="">请选择要预约的道具</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="bookingDate">使用日期</label>
                            <input type="date" id="bookingDate" class="form-control" required>
                        </div>
                    </div>
                    <div class="form-row">
                        <div class="form-group">
                            <label for="startTime">开始时间</label>
                            <input type="time" id="startTime" class="form-control" required>
                        </div>
                        <div class="form-group">
                            <label for="endTime">结束时间</label>
                            <input type="time" id="endTime" class="form-control" required>
                        </div>
                        <div class="form-group">
                            <label for="quantity">数量</label>
                            <input type="number" id="quantity" class="form-control" min="1" max="10" value="1" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="specialRequirements">特殊要求</label>
                        <textarea id="specialRequirements" class="form-control" rows="3"
                            placeholder="如有特殊要求请在此说明（如尺寸、颜色等）"></textarea>
                    </div>

                    <!-- 费用预览 -->
                    <div class="cost-preview" id="costPreview" style="display: none;">
                        <h5>费用预览</h5>
                        <div class="cost-details">
                            <div class="cost-item">
                                <span class="label">租赁费用:</span>
                                <span class="value" id="rentalCost">¥0</span>
                            </div>
                            <div class="cost-item">
                                <span class="label">押金:</span>
                                <span class="value" id="depositCost">¥0</span>
                            </div>
                            <div class="cost-item total">
                                <span class="label">总计:</span>
                                <span class="value" id="totalCost">¥0</span>
                            </div>
                        </div>
                    </div>

                    <div class="form-actions">
                        <button type="submit" class="btn btn-primary">确认预约</button>
                        <button type="button" class="btn btn-secondary"
                            onclick="equipmentManager.clearForm()">清空</button>
                    </div>
                </form>
            </div>

            <!-- 我的租赁记录 -->
            <div class="my-bookings">
                <h4>📋 我的租赁记录</h4>
                <div class="bookings-list" id="bookingsList">
                    <!-- 租赁记录将通过JS动态加载 -->
                </div>
            </div>

            <!-- 费用说明 -->
            <div class="pricing-info">
                <h4>💰 费用说明</h4>
                <div class="pricing-cards">
                    <div class="pricing-card">
                        <h5>租赁费用</h5>
                        <ul>
                            <li>普通道具: ¥10-50/小时</li>
                            <li>专业装备: ¥50-200/小时</li>
                            <li>儿童道具: ¥5-30/小时</li>
                        </ul>
                    </div>
                    <div class="pricing-card">
                        <h5>押金政策</h5>
                        <ul>
                            <li>普通道具: ¥50-200押金</li>
                            <li>贵重装备: ¥500-1000押金</li>
                            <li>押金在完好归还后退还</li>
                        </ul>
                    </div>
                    <div class="pricing-card">
                        <h5>注意事项</h5>
                        <ul>
                            <li>请按时归还道具</li>
                            <li>损坏道具需照价赔偿</li>
                            <li>超时归还将收取额外费用</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <script src="js/main.js"></script>
    <script src="js/equipment-book.js"></script>
</body>

</html>